﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

/// <summary>
/// Summary description for clsJobTypeDAL
/// </summary>
public class clsJobTypeDAL
{
    InstantNaukriDataContextDataContext objInstantNaukriDataContextDataContext = new InstantNaukriDataContextDataContext();
    public clsJobTypeDAL()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public List<IN_TB_JOB_TYPE> GetAllJobTypes()
    {
        try
        {
            List<IN_TB_JOB_TYPE> objIN_TB_JOB_TYPE = new List<IN_TB_JOB_TYPE>();
            objIN_TB_JOB_TYPE = (from obj in objInstantNaukriDataContextDataContext.IN_TB_JOB_TYPEs
                                 select obj).ToList();
            return objIN_TB_JOB_TYPE;
        }
        catch (Exception)
        {

            throw;
        }
    }

    public IN_TB_JOB_TYPE GetJobTypeById(int ID)
    {
        try
        {
            IN_TB_JOB_TYPE objIN_TB_JOB_TYPE = new IN_TB_JOB_TYPE();
            objIN_TB_JOB_TYPE = (from obj in objInstantNaukriDataContextDataContext.IN_TB_JOB_TYPEs
                              where obj.ID == ID
                              select obj).SingleOrDefault();
            return objIN_TB_JOB_TYPE;
        }
        catch (Exception)
        {

            throw;
        }
    }
}
